function exportSVM(data, cls, output)
    f = fopen(output, 'w');
    [M, N] = size(data);
    for i = 1:M
        fprintf(f, '%d', cls);
        for j = 1:N
            fprintf(f, ' %d:%0.5f', j, data(i,j));
        end
        fprintf(f, '\n');
    end
    fclose(f);
end
